package com.bm.server.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bm.server.dto.AddAllyDto;
import com.bm.server.dto.AddAllyIDDto;
import com.bm.server.entity.AddAlly;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * Hey man，take your time！
 *
 * @Author: 李松洋
 * @Description:代码永不报错，工资永在上涨！！！
 * @Date: Create in 10:17 2022/7/23
 */
public interface JoinAllyDao extends BaseMapper<AddAlly> {
  
    @Select("SELECT COUNT(*) as num FROM t_addally WHERE allyid=#{allyid} ORDER BY uid")
    AddAllyDto query(int allyid);
    @Select("SELECT uid from t_addally where allyid=#{allyid} and uid=#{uid}")
    AddAllyIDDto one(@Param("allyid") int allyid, @Param("uid") Long uid);
    
 
}
